// src/dto/PostSummaryDto.js
export class PostSummaryDto {
  constructor(data = {}) {
    this.id = data.id || null
    this.title = data.title || ''
    this.authorId = data.authorId || null
    this.authorName = data.authorName || ''
    this.authorAvatarUrl = data.authorAvatarUrl || ''
    this.categoryId = data.categoryId || null
    this.categoryName = data.categoryName || ''
    this.viewCount = data.viewCount || 0
    this.replyCount = data.replyCount || 0
    this.likeCount = data.likeCount || 0
    this.favoriteCount = data.favoriteCount || 0
    this.isTop = data.isTop || 0
    this.isEssence = data.isEssence || 0
    this.status = data.status || 1
    this.createdAt = data.createdAt || ''
    this.updatedAt = data.updatedAt || ''
  }
}
